package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class TargetArrayElementSpecification implements TargetSpecification {

    private int beginIndex;
    private int endIndex;
    private TargetArrayReference targetArrayReference;
    private SimpleValueSpecification simpleValueSpecification;

    public TargetArrayElementSpecification(int endIndex,
                                           TargetArrayReference targetArrayReference,
                                           SimpleValueSpecification simpleValueSpecification) {
        this.beginIndex = targetArrayReference.getBeginIndex();
        this.endIndex = endIndex;
        this.targetArrayReference = targetArrayReference;
        this.simpleValueSpecification = simpleValueSpecification;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public TargetArrayReference getTargetArrayReference() {
        return targetArrayReference;
    }

    public SimpleValueSpecification getSimpleValueSpecification() {
        return simpleValueSpecification;
    }

}
